package com.shouhe.mysap.util;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

/**
 * @author 守鹤
 * @date 2020/6/1 21:41
 */
public class ListUtil {

    /**
     * 根据T类型转化，Object List
     * @param objects
     * @param T
     * @param <T>
     * @return
     */
    public static <T> List<T> getListT(List<?> objects, Class T) {
        List<T> list = new ArrayList<>();
        for (Object object : objects) {
            list.add((T) object);
        }
        return list;
    }

}
